<?php
/**
 * Created by PhpStorm.
 * User: yyq
 * Date: 2017/3/27
 * Time: 17:52
 */

namespace Wap\Controller;


use Portal\Model\PostsModel;
use Think\Controller;

class BannerController extends Controller
{
    private $posts_model;

    public function __construct()
    {
        parent::__construct();
        $this->posts_model = new PostsModel();
    }

    public function artDisplay() {
        $id= I('get.id');
//        $id = 4;
        $detail = $this->posts_model->where(array('id' => $id))->field('post_title, post_content')->find();

//        dump($detail);
        $this->assign('content', $detail['post_content']);
        $this->display();
    }
}